package com.example.controller;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@ConfigurationProperties(prefix="my")
@RestController	
public class AController {

	private List<String> servers = new ArrayList<String>();

	public List<String> getServers() {
		return this.servers;
	}
	
	@RequestMapping("/root")
	public String root () {
		return "root";
	}

	@RequestMapping("/hello")
	public String hello (String word) {
		return "hello";
	}
	
	@RequestMapping("/list")
	public List<String> list (String word) {
		List<String> list = new ArrayList<String>();
		return list;
	}
	
	@RequestMapping("/map")
	public Map<String, Object> map (String word) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("key", "value");
		return map;
	}

}
